<% form_tag do %>
  Amount: <%= text_field_tag 'amount' %><br />
  Description: <%= text_field_tag 'description' %><br />
  User: <%= record_select_field 'user', User.new %><br />
  Category: <%= select_tag 'category', options_for_select({'User' => 2, 'Admin' => 1}) %><br />
  <%= submit_tag %>
<% end %>

<p>
<h5>Posted Params:</h5>
<%= params.reject {|k,v| [:action, :controller].include? k.to_sym}.inspect %>
</p>

<div id="explanation">
<p>This is a simple example of using RecordSelect in a form. The "User" field above was generated by the <i>record_select_field</i> helper. Notice that the visible text field displays the result of user#to_label, and that the hidden input field (which actually submits) stores the user#id.</p>
<p>Also notice the &lt;select> box underneath RecordSelect. It should hide underneath the RecordSelect dialog in IE6, provided the iFrame hack is working properly.</p>
</div>

